//
//  YJRecordTipsView.m
//  YJB
//
//  Created by YJB on 2016/11/19.
//  Copyright © 2016年 YJB. All rights reserved.
//

#import "YJRecordTipsView.h"

@interface YJRecordTipsView ()
@property (weak, nonatomic) IBOutlet UILabel *tipLabel;
@property (weak, nonatomic) IBOutlet UIImageView *voiceIcon;
@property (weak, nonatomic) IBOutlet UIImageView *cancelVoiceIcon;

@end


@implementation YJRecordTipsView
+ (YJRecordTipsView *)getRecordTipsView
{
    return [[[NSBundle mainBundle]loadNibNamed:NSStringFromClass(self) owner:nil options:nil] lastObject];
}

-(void)awakeFromNib
{
    [super awakeFromNib];
    self.tipLabel.layer.cornerRadius = 2;
    self.tipLabel.layer.masksToBounds = YES;
}
- (void)setIsCancel:(BOOL)isCancel
{
    
    self.cancelVoiceIcon.hidden = !isCancel;
    self.voiceIcon.hidden = isCancel;
    self.yinjieView.hidden = isCancel;
    self.tipLabel.text = isCancel?@"松开手指，取消发送":@"手指上滑，取消发送";
    self.tipLabel.backgroundColor = isCancel?[UIColor redColor]:[UIColor clearColor];
}

@end
